package com.csea.common.domain.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csea.common.domain.dos.UserRepositoryDo;

public interface UserRepositoryMapper extends BaseMapper<UserRepositoryDo> {
    // 继承MyBatis-Plus基础Mapper
    default UserRepositoryDo selectByUserIdAndRepositoryName(Integer userId, String repositoryName) {
        return selectOne(new LambdaQueryWrapper<UserRepositoryDo>()
                .eq(UserRepositoryDo::getUserId, userId)
                .eq(UserRepositoryDo::getRepositoryName, repositoryName));
    }
}